<?php

/*
  VoIP Wholesale 1.0
  ------------------
  Document   : module_simulator
  Created on : Nov 1, 2011, 4:55:27 PM
  Author     : Milos Jovanovic <miloscode@gmail.com>
  Description:

 */
?>
<div id="page-title"><?=lang('term_routing_simulator')?></div>

<div id="page-desc"><?=lang('text_routing_simulator_desc')?></div>

<div class="ui-widget"> 
    <div id="content">
        <!-- PAGE CONTENT -->
                
        <fieldset class="ui-widget-content ui-state-active">

            <legend class="ui-widget-content ui-state-active"><?=lang('form_origin_point')?></legend>
                
            <form action="javascript:void(0);" method="post" id="simulator-form">
			<table>
			<tr class="carrier_selection">
				<td>
				<label><?=lang('term_origin_carrier')?></label>
				</td>
				<td>
				<select name="data[carrier]" id="carrier_selection">
				<option value="none">--</option>
				<?php
				foreach($carriers as $carrier)
				{?>
					<option value="<?=$carrier['id']?>"><?=$carrier['username']?></option>
				<?php 
				}
				?>
				</select>
				</td>
			</tr>
			<tr class="trunk_selection">
				<td>
				<label><?=lang('term_origin_trunk')?></label>
				</td>
				<td>
				<select name="data[origin_trunk]" id="trunk_selection">
				<option value="none">--</option>
				</select>
				</td>
			</tr>			
			<tr class="codec_selection">
				<td>
				<label><?=lang('term_codec')?></label>
				</td>
				<td>
				<select name="data[codec]" id="codec_selection">
				<option value="none">--</option>
				</select>
				</td>
			</tr>						
			<tr class="button-simulate">
				<td>&nbsp;</td>
				<td>
				<br />
				<table><tr>
				<td><input type="checkbox" name="data[active_routing_only]" value="1"/></td><td><?=lang('text_active_routing_only')?></td>
				</tr></table>
				<br />
				<button id="button-simulate"><?=lang('button_simulate')?></button>
				</td>							
			</tr>
			</table>
            </form>                
        </fieldset>
        <br />
		<fieldset class="ui-widget ui-widget-content ui-corner-all">
			<legend class="ui-widget-content ui-state-active"><?=lang('term_response')?></legend>		
			<div id="response"></div>
		</fieldset>
    </div>    
</div>   